package com.service.impl;

import com.dao.ChartDao;
import com.dao.ChartRedisDao;
import com.entity.Chart;
import com.service.ChartService;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;
import java.util.List;
@Service("chartService")
public class ChartServiceImpl implements ChartService {

    @Resource(name="chartRedisDao")
    private ChartRedisDao chartRedisDao;

    public void setChartDao(ChartDao chartDao)
    {
        this.chartRedisDao = chartRedisDao;
    }

    public void add(Chart chart){
        chartRedisDao.add(chart);
    }

    public void delete(String id){
        chartRedisDao.delete(id);
    }

    @Override
    public Chart get(String id) {
        return null;
    }

    public List<Chart> getCharts(String typeName)
    {
        return chartRedisDao.getCharts(typeName);
    }

}